-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#4009] Clean up usage of merged data #4110
Conversation
def _get_printable_data(submission: Submission) -> list[tuple[str, Any]]: | ||
printable_data: list[tuple[str, Any]] = [] | ||
merged_data = submission.get_merged_data() | ||
|
||
for component in filter_printable(submission.form.iter_components(recursive=True)): | ||
key = component["key"] | ||
value = format_value(component, merged_data.get(key), as_html=False) | ||
printable_data.append((component.get("label", key), value)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function was already adapted in d7b63bd, and figured it was still relevant as it was kept as well in this commit (while the other uses of submission.get_printable_data()
were removed).
In the future, the `data` property could also be removed, to enforce people using the state wrapper instead.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4110 +/- ##
==========================================
- Coverage 96.10% 96.10% -0.01%
==========================================
Files 730 730
Lines 23089 23079 -10
Branches 2698 2697 -1
==========================================
- Hits 22189 22179 -10
Misses 638 638
Partials 262 262 ☔ View full report in Codecov by Sentry. |
Latest is still broken, there's a minimum repro on our test environment. |
88d411b
to
d6c54da
Compare
Fixes #4009, #979.
As said in the issue, I'm not able to reproduce the sdk rendering bug anymore on latest.
This PR can safely be reviewed commit per commit.